package com.eco
{
	import com.eco.*;
	import com.framework.*;
	
	import flash.display.MovieClip;
	import flash.events.*;
	import flash.utils.*;
	
	//敌人类-原油
	public class EnemyCrudeOil extends Enemy
	{
		public function EnemyCrudeOil()
		{
			super( 50, 10, Enemy.ENEMY_CRUDEOIL);
			
			iFreezedFrames = 24;
			iAttackPower = 10;
			iAttackPossibility = 8;
			iSkillLastingTime = 100;
		}
		
		override public function Update():void
		{
			super.Update();
		}
		
		override protected function Attack():void
		{
			super.Attack();
		}
		
		override protected function StartSkill():void
		{
			this.bCollidable = false;
			this.alpha = 0.5;
		}
		
		override protected function EndSkill():void
		{
			this.bCollidable = true;
			this.alpha = 1;
		}
		
		override protected function BeatFighter():void
		{
			super.BeatFighter();
			
		}
		
		override protected function BeBeaten():void
		{
			super.BeBeaten();
			
			//原油敌人被卫士撞飞时，有一定几率获得飘忽不定效果，在一定时间内消散开，无法被撞击撼动
			if( Math.random()<= iAttackPossibility/16 )
			{
				this.SetState( Enemy.STATE_SKILL );
			}
		}
	}
}